<template>
	<view>
		<el-dialog
		  title="提示"
		  :visible="confirmFlag"
		  width="30%"
		  center
		  @close="close">
		  <span class="content">{{ title || '这是默认内容' }}</span>
		  <span slot="footer" class="dialog-footer">
		    <el-button type="primary" @click="confirmClick(1)">确 定</el-button>
			<el-button @click="confirmClick(0)">取 消</el-button>
		  </span>
		</el-dialog>
	</view>
</template>

<script>
	export default {
		props: {
			confirmFlag: {
				type: Boolean,
				default: false
			},
			
			title: {
				type: String,
				default: ''
			}
		},
		
		methods: {
			confirmClick(i) {
				this.$emit('confirmFlagClick', i)
			},
			
			close() {
				this.$emit('confirmFlagClick', false)
			}
		}
	}
</script>

<style scoped>
	.content {
		display: block;
		text-align: center;
	}
</style>
